package _0_语法._3_分支;

import java.util.Scanner;

public class _3_根据输入的x值_输出y2 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x,y;
        System.out.println("请输入x的值：");
        x = scanner.nextInt();

        if(x < 1){
            y = x;
        }
        else {
            if(x < 10 && x >= 1){
                y = 2 * x - 1;
            }
            else {
                y = 3 * x - 11;
            }
        }
        System.out.println("y = " + y);
    }
}




























